<?php
// header("Location:index.php");
require 'membersession.class.php' ;

require 'admin/sql.class.php';

$mobile = "";

if (empty($_POST["mobile"])) {
	exit("请先填写手机号!");
}

if (empty($_POST["password"])) {
	exit("请先填写密码!");
}

$mobile = $_POST["mobile"];
$password = $_POST["password"];

// 先去数据库查找这个手机号
$arr = searchMemberFromMobile($mobile);
if (count($arr) > 0) {
	exit("该手机号已被注册");
}

// 可以注册

addMemberInfo("", "", $password, NULL, 0, $mobile);


echo("<script language='javascript'>alert('注册成功!');window.top.location.href='/mcnews/index.php'</script>");


// echo("<script language='javascript'>window.top.location.href='/mcnews/index.php'</script>");
?>